import { createApp } from "vue";
import App from "./App.vue";
// 全局样式
import "./style.css";
import "./styles/color/index.scss";
import "./styles/index.scss";
// 全局仓库和路由
import pinia from "./store/store";
// 安装的持久化插件
import piniaPersist from "pinia-plugin-persist";
import router from "./router/index";
//外部组件
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import lang from "element-plus/lib/locale/lang/zh-cn";
import zhCn from "element-plus/es/locale/lang/zh-cn";

import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 测试lwui
import lwUI from "../packages/index";
import i18n from "@/locales/i18n";
const app = createApp(App);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
pinia.use(piniaPersist);
app.use(pinia);
app.use(router);
app.use(i18n);
app.use(ElementPlus, { locale: zhCn }).use(lwUI).mount("#app");
